<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{border:solid 10px black;}
    </style>
</head>
<body>
    <div class="box" style="width:100px;height:100px;background:red">hello</div>
</body>
<script>
    var obox=document.querySelector(".box");
    console.log(obox);

    // 行内样式操作
    // console.log(obox.style);

    console.log(obox.style.width);
    console.log(obox.style.height);
    console.log(obox.style.background);
    console.log(obox.style.color);

</script>
</html>